﻿using System;
using System.Collections.Generic;

class SortByLengthOfElements
{
    static void Main()
    {
        string[] array = { "tasdasdasdasdhasdasdest", "testïhssn","asdaas" , "tedhdst", "tesdgsdghsdgst", "tsdfsehst", "testahsdasd", "tdsfhest", "tgsehst" };
        Print(Sort(array));
    }

    static string[] Sort(string[] array)

    {
        int[] lengths = new int[array.Length];
        for (int i = 0; i < lengths.Length; i++)
        {
            lengths[i] = array[i].Length;
        }
        Array.Sort(lengths, array);
        return array;
    }

    static void Print(string[] array)
    {
        for (int i = 0; i < array.GetLength(0); i++)
        {
            Console.WriteLine(array[i]);
        }
    }

}